package com.aerfafish.spider.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class SpiderConfig {

    public static Integer pageNum = null;

    public static Long updateTime = null;

    public static Long cacheTime = null;

    public static Long lockTime = null;

    @Value("${spider.history-value.page-num}")
    public void setPageNum(Integer pageNum) {
        SpiderConfig.pageNum = pageNum;
    }

    @Value("${spider.update-time}")
    public void setUpdateTime(Long updateTime) {
        SpiderConfig.updateTime = updateTime;
    }

    @Value("${spider.cache-time}")
    public void setCacheTime(Long cacheTime) {
        SpiderConfig.cacheTime = cacheTime;
    }

    @Value("${spider.lock-time}")
    public void setLockTime(Long lockTime) {
        SpiderConfig.lockTime = lockTime;
    }

}
